﻿@model WebStore.Web.App.Models.Cart.OrdersModel
<h1 class="title">Orders</h1>
<table width="90%" align="center">
    <thead>
        <tr>
            <th>Status</th>
            <th>Date</th>
            <th>Price</th>
        </tr>
    </thead>
    <tbody>
        @foreach (var order in Model.Orders)
        {
           
            <tr>

                <td align="center">
                    <a href="@Url.Action("Order", "Cart", new { id = order.Id })">
                        @order.OrderStatus
                    </a>
                </td>
                <td align="center">@order.OrderDate</td>
                <td align="center">@order.TotalValue.ToString("c")</td>
            </tr>
        }
    </tbody>
    <tfoot>
        <tr>
            <td colspan="2" align="right">Total:</td>
            <td align="center">
                @Model.Orders.Sum(x => x.TotalValue).ToString("c")
            </td>
        </tr>
    </tfoot>
</table>
